calendar object
This method will add a number of years to the year property.
bool add_years(int years)
Parameters:
years
The number of years to add.
Return value:
true on success, false on failure.
Remarks:
A negative value in the years parameter will subtract years from the current year.
In most cases, the month and date will not change. However, if the date is February 29, and the adjusted year property is not a leap year, the calendar will set the date to March 1.
Example:
// Create a calendar and set it to October 7, 1767 at 09:00 and add a year.
void main()
{
calendar test;
test.set(1767, 10, 7, 9, 0, 0);
test.add_years(1);
alert("Date", "The date is "+test.weekday_name+", "+test.month_name+" "+test.day+", "+test.year+", at "+test.hour+":"+test.minute+":"+test.second);
}